/**
 * FileName: Sickbed
 * Author:   P
 * Date:     2021/3/3 15:26
 * Description:
 */
package com.hospital.nurse.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hospital.nurse.pojo.Sickbed;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SickbedMapper extends BaseMapper<Sickbed> {

    List<Sickbed> getSickAndPatients();

    //根据床位id得到 该病人的信息
    Sickbed getScikbedPatient(@Param("sid") int sid);
    //获得空床的床位号
    List<Sickbed> getNullBed();

    //跟换病床
    void editSickebed(@Param("sid") int sid , @Param("pid") int pid);

    //获得所在科室的空床
    List<Sickbed> getDepNullBed(@Param("did") int did);



}
